<template>
    <div>
        <gohead></gohead>
        <gobanner 
        :bannerimg="bannerimg"
        :bannerp="bannerp"
        :gallaryimgs="gallaryimgs"
        ></gobanner>
        <golist :chengren="chengren"></golist>
        <div style="height: 2000px;"></div>
    </div>
</template>

<script>
import axios from "axios"
import gobanner from '../components/gobanner.vue'
import golist from '../components/golist.vue'
import gohead from '../components/gohead.vue'
    export default {
        name: 'gogo',
        components:{
            gobanner,
            golist,
            gohead,
        },
        data() {
            return {
                bannerimg:{},
                bannerp:{},
                chengren:{},
                gallaryimgs:{},
                }
            },
        methods: {
            getinfo() {
                axios.get('/static/detail.json').then((res) => {
                    var data = res.data.data;
                    this.bannerimg = data.bannerImg;
                    this.bannerp = data.sightName;
                    this.chengren = data.categoryList;
                    this.gallaryimgs = data.gallaryImgs;
                    console.log(this.chengren)
                })
            },
        },
        created() {
            this.getinfo();
        }
    }
</script>

<style scoped> 
</style>